<%@page import="fun.wlfj.vo.PayList"%>
<%@page import="fun.wlfj.vo.Product"%>
<%@page import="java.util.List"%>
<%@page import="fun.wlfj.factory.CashSystemFactory"%>
<%@page import="fun.wlfj.vo.User"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
// 判断是否可以访问 否则跳到登陆界面
User user = (User)session.getAttribute("User");
if(user == null){
	//response.sendRedirect("login.html");
	request.getRequestDispatcher("login.jsp").forward(request, response);
	return;
}
%>
<!doctype html>
<html class="no-js " lang="en">
<head>
<meta charset="utf-8">

<title>门诊收费系统-患者</title>
<link rel="icon" type="image/ico" href="assets/images/favicon.ico" />
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- vendor css files -->
<link rel="stylesheet"
	href="assets/js/vendor/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/vendor/animsition.min.css">
<link rel="stylesheet" href="assets/js/vendor/morris/morris.css">
<!-- project main css files -->
<link rel="stylesheet" href="assets/css/main.css">
</head>
<style>
.table tbody tr td {
	vertical-align: middle;
}
</style>
<body id="falcon" class="main_Wrapper">
	
		<!-- HEADER Content -->
		<div id="header">
			<header class="clearfix">
				<!-- Branding -->
				<div class="branding">
					<a class="brand" href="index.jsp"> <span>校医院门诊收费系统</span>
					</a> <a role="button" tabindex="0"
						class="offcanvas-toggle visible-xs-inline"> <i
						class="fa fa-bars"></i>
					</a>
				</div>
				<!-- Branding end -->
				<!-- Left-side navigation end -->

				<!-- Search end -->
				<!-- Right-side navigation -->
				<ul class="nav-right pull-right list-inline">
					<li class="dropdown nav-profile"><a href="javascript:void(0);"
						class="dropdown-toggle" data-toggle="dropdown"> <img
							src="assets/images/profile-photo.jpg" alt="" class="0 size-30x30">
					</a>
						<ul class="dropdown-menu pull-right" role="menu">
							<li>
								<div class="user-info">
									<div class="user-name"><%=user.getUserName() %></div>
									<div class="user-position online"><%="您的ID:" + String.format("U%06d", user.getUserID()) %></div>
								</div>
							</li>
							<li><a href="login.jsp" role="button" tabindex="0"> <i
									class="fa fa-sign-out"></i>退出
							</a></li>
						</ul></li>
				</ul>
				<!-- Right-side navigation end -->
			</header>
		</div>
		<!--/ HEADER Content  -->
		<div id="controls">
			<aside id="leftmenu">
				<div id="leftmenu-wrap">
					<div class="panel-group slim-scroll" role="tablist">
						<div class="panel panel-default">
							<div id="leftmenuNav" class="panel-collapse collapse in"
								role="tabpanel">
								<div class="panel-body">
									<!--  NAVIGATION Content -->
									<ul id="navigation">

										<li <%=which.equals("在线公告板") ? " class=\"active open\"" : "" %>><a href="index.jsp"> <i
												class="fa fa-dashboard"></i> <span>在线公告板</span>
										</a></li>
										<li><a role="button" tabindex="0"> <i
												class="fa fa-envelope"></i> <span>收费管理</span>
										</a>
											<ul>
											<%
											int count = 0;
											List<PayList> list = CashSystemFactory.getPayListDao(user).getPayLists(1);
											for(PayList p : list) if(p.getUserID() == user.getUserID()) count ++;
											%>
												<li <%=which.equals("待支付处方") ? " class=\"active open\"" : "" %>><a href="needPay.jsp"> <i
														class="fa fa-angle-right"></i>待支付处方 <span
														class="label label-danger"><%=count %></span>
												</a></li>
												<li <%=which.equals("已支付处方") ? " class=\"active open\"" : "" %>><a href="finishedPay.jsp"> <i
														class="fa fa-angle-right"></i>已支付处方
												</a></li>
												<li <%=which.equals("已退费处方") ? " class=\"active open\"" : "" %>><a href="cancledPay.jsp"> <i
														class="fa fa-angle-right"></i>已退费处方
												</a></li>
											</ul></li>
										<li <%=which.equals("个人信息") ? " class=\"active open\"" : "" %>><a href="personInfo.jsp"> <i
												class="fa fa-arrow-right"></i> <span>个人信息</span>
										</a></li>
									</ul>
									<!--/ NAVIGATION Content -->
								</div>
							</div>
						</div>
					</div>
				</div>
			</aside>
		</div>